#ifndef REGISTRATIONDIALOG_H
#define REGISTRATIONDIALOG_H



#include <QDialog>
#include <QLabel>
#include <QPushButton>
#include <QDialogButtonBox>
#include <QLineEdit>
#include <QComboBox>
#include <QGridLayout>
#include <QStringList>
#include <QDebug>

#include <utils/popup.h>
#include <users/user.h>

namespace login_and_registration {
class registrationDialog : public QDialog
{
	Q_OBJECT
public:
	registrationDialog(QWidget *parent = nullptr);

signals:
	void sendUser(const users::user& user);

	void sendDataCopied();


private slots:
	void checkPasswords();

	void createUser();

	void isPasswordSecure(const QString& password);



	void generatePassword();

private:
	QLabel *labelUsername;

	QLabel *labelPassword;

	QLabel *label2ndPassword;

	QLabel *labelUserCorrect;

	QLabel *passwordErrorLabel;

	QLineEdit *editPassword;

	QLineEdit *edit2ndPassword;

	QLineEdit *editUserName;

	QDialogButtonBox *buttons;

	QComboBox *algorithmCombo;

	bool passwordsAreSame;

	bool passwordIsSecure;

	utils::PopUp *_pop_up;

};
}

#endif // REGISTRATIONDIALOG_H
